<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://suryani.cn/support/tags" prefix="page"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>账号管理</title>
<base href="${base }" />
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lte IE 8]>
	<script language="javascript" type="text/javascript" src="excanvas.min.js"></script>
<![endif]-->
<link rel="stylesheet/less" type="text/css" href="less/default.less">
<link rel="stylesheet/less" type="text/css" href="css/select.css">
<script type="text/javascript" src="js/select.js"></script>
<script type="text/javascript" src="js/less.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.stickymenu.js"></script>
<script type="text/javascript" src="js/emm-1.0.js"></script>
<script type="text/javascript" src="js/jquery.topLink.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.flot.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
		$("#accountForm").validate({
			rules : {
				oldPassword : {
					required : true
				},
				newPassword : {
					required : true
				},
				confirmPassword : {
					required : true,
					equalTo:"#newPassword"
				}
			},
			messages : {
				oldPassword : {
					required : "请输入旧密码。"
				},
				newPassword : {
					required : "请输入新密码。"
				},
				password : {
					required : "请再次输入新密码。"
				},
				confirmPassword : {
					required : "请输入确认密码。",
					equalTo:"两次输入密码不一致。"
				}
			}
		});
	});	
</script>
</head>
<body>
	<div class="page">
		<page:view page="/common/left" />
		<div id="main" class="main container">
			<page:view page="/common/header?parentTitle=账户设置" />
			<div id="menu" class="row-fluid menu">
			</div>
			<div class="row-fluid">
				<div class="widget">
					<div class="inner">
						<div class="btn-group">
						<form id="accountForm" action="myaccount/changepassword" method="post">
							<c:if test="${!empty error}" >
                            <div class="alert alert-error">
                                ${error}
                            </div>
                            </c:if>
                            <c:if test="${!empty message}" >
                            <div class="alert alert-success">
                                ${message}
                            </div>
                            </c:if>
							<fieldset align="center">
								<table>
								<td><label for="oldPassword">旧密码：</label></td>
								<td><input type="password" name="oldPassword" id="oldPassword" class="text ui-widget-content ui-corner-all" /></td>
								</tr>
								<tr id="pwd">
								<td><label for="newPassword">新密码：</label></td>
								<td><input type="password" name="newPassword" id="newPassword" class="text ui-widget-content ui-corner-all" /></td>
								</tr>
								<tr id="cpwd">
								<td><label for="confirmPassword">确认密码：</label></td>
								<td><input type="password" name="confirmPassword" id="confirmPassword" class="text ui-widget-content ui-corner-all" /></td>
								</tr>
								</table>
							</fieldset>
								<input type="submit" class="btn dropdown-toggle" value="修改">
								<input type="reset" class="btn dropdown-toggle" value="取消">
							</form>
						</div>
					</div>
				</div>
			</div>
			<div class="container">
				<page:view page="/common/footer" />
			</div>
		</div>
	</div>
</body>
</html>